/*预习作业:一家商场每月8号,18号,28号是会员日，当天会员卡顾客购物打八折。
要求用户输入购物金额、是否是会员，计算出实际要付的金额。。。*/
package Work0528;

import java.util.Date;
import java.util.Scanner;

public class Preview {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Date date = new Date();
		String a = String.format("%td", date);
		System.out.print("请输入金额:");
		double consumption = in.nextDouble();
		if (a.equals("8") || a.equals("18") || a.equals("28")) {
			System.out.println("是否为会员?(是/否)");
			String q = in.next();
			if (q.equals("是")) {
				System.out.println("全场八折!");
				System.out.println("实际付款" + consumption * 0.8 + "元");
			} else {
				System.out.println("实际付款" + consumption + "元");
			}
		} else {
			System.out.println("实际付款" + consumption + "元");
		}
	}

}
